﻿using Xtensive.Orm;

namespace SimpleIndex.Model
{
    /*
     * To declare non-unique one-column index, use [Field(Indexed = true)] construct
     * It is a short form of [Index("Title")] declaration
     */
    [HierarchyRoot]
    public class Book : Entity
    {
        [Field, Key]
        public int Id { get; set; }

        [Field(Indexed = true)]
        public string Title { get; set; }

        [Field]
        public string Isbn { get; set; }

        public Book(Session session) :
            base(session) {}
    }
}